package study.springcloud.config.nacos.support.listener;

import com.alibaba.nacos.api.config.annotation.NacosConfigListener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.Properties;

@Slf4j
@Component
@RefreshScope
public class _2_NacosConfigListener {

    @NacosConfigListener(dataId = "config.properties", groupId = "DEFAULT_GROUP")
    public void onChanged(String props) {
        log.info(">>>>>>");
        log.info(">>>>>> {}", props);
        log.info(">>>>>>");
    }
}
